<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of soa2Logs
 *
 * @author dxx
 */

namespace app\common\model\log;

use think\Model;

class KoombindLogs extends Model {

    protected $table = 'jj_koombind_logs';
    protected $connection = ['database' => 'jooj_log'];

    /**
     * 查询
     * @param type $condition
     * @param type $field
     */
    public function findResultByCondition($condition, $field) {
        $result = $this->where($condition)->order('log_id desc')->field($field)->find();
        return $result;
    }

    /**
     * 添加一个LOG
     * @param type $data
     * @return type
     */
    public function addOne($data) {
        $add = $this->data($data)->save();
        return $add->log_id;
    }

}
